package main

import (
  "encoding/json"
  "fmt"
)
type Book struct {
  Title string
  // Authors []string
  Price uint32
}

func TestJson() {
  // gobook := Book{
  //   "Go",
    // ["XShiWei", "HughLv", "Pandaman", "Guagua"],
  //   9.99
  // }

  gobook := Book { "GoTitle", 100 }
  var newBook Book

  b , _:= json.Marshal(gobook)
  json.Unmarshal(b, &newBook)

  fmt.Println(b)

  fmt.Println(newBook.Title)
}

func main () {
  TestJson()
}
